package login

import (
	"gitee.com/goxiang2/server/lib/lib_rpc"
	lp "gitee.com/goxiang2/server/proto/login"
	"log"
)

type GxLogin struct {
}

func init() {
	//服务注册
	lib_rpc.RegisterService("Login", &GxLogin{})
}

// Run 服务启动函数
func (login *GxLogin) Run() error {
	return nil
}

// Login 登陆消息处理函数
func (login *GxLogin) Login(req *lp.LoginReq, rsp *lp.LoginRsp) (uint32, error) {
	log.Println("-----login----", req.Username, req.Password)
	rsp.Token = "aaaaaaaaaaaaa"
	return 0, nil
}
